﻿@{
    ViewBag.Title = "Cập nhật quảng cáo";
    Layout = "~/Views/Shared/_Layout.MyAccount.cshtml";
}
<form method="post" class="form" action="/MyAccount/AdvertiseList/Edit/@ViewBag.BannerId">
	<fieldset id="apps">
		<h2 class="app">
	        <strong>Express - Cập nhật quảng cáo</strong>
        </h2>
		<div class="errorMessage" data-bind="visible: InvalidateForm" >
			<span class="error">Xin hãy nhập thông tin bên dưới chính xác.</span>
		</div>				
		<div class="title">
			<h3>Thông tin quảng cáo</h3>
		</div>
		<div class="columns">
			<div class="col indent" style="width:460px">
				<div class="row">
					<label for="text1">Tên quảng cáo:</label>
					<input class="text" type="text" style="width:280px" data-bind="value: Title, attr:{maxlength:250}" name="Title" />
				</div>               
				<div class="row">
					<label for="text2">Tóm tắt:</label>
                    <div class="groupinput">
					<input class="text" type="text" style="width: 280px" data-bind="value: ShortDesc, attr:{maxlength:50}" name="ShortDesc" />
                    </div>
				</div>
				<div id="editform" class="row">
					<label for="text12">Xác nhận hiển thị:</label>
                    <div class="groupinput"><input class="text" type="checkbox" data-bind="checked: Approved" name="Approved" /></div>					    
				</div>
				<div id="editform" class="row">
					<label for="text12">Kích hoạt:</label>
                    <div class="groupinput"><input class="text" type="checkbox" data-bind="checked: Active" name="Active" /></div>					    
				</div>
			</div>    
            <div class="col"> 
				<div class="row">
					<label for="text4">Mô tả thêm:</label>
                    <div class="groupinput">
					    <textarea class="text" cols="25" rows="5" style="width: 280px" data-bind="value: LongDesc, attr:{maxlength:500}" name="LongDesc">
                        </textarea>
                    </div>
				</div>
            </div>        
		</div>  
        
        <div class="title">
			<h3>Thông tin ảnh</h3>
		</div>
        <div class="columns">            
			<div class="col" style="width:850px">
                <div class="row">
					<label for="text5">Ảnh:</label>
				</div>
                <div class="row">
                    <img alt="logo" data-bind='attr: {src: ImageURL}' />
                </div>
                <div class="row">
                    <input class="text" type="text" style="width:650px" name="ImageURL" data-bind="value: ImageFileName" />                
                </div>
                <div class="row">
					<input type="file" name="fileDataBanner" id="fileDataBanner" class="btn btn-choose-file"  />                        
				</div>
			</div>
        </div>	

        <div id="progress" class="uploading">Uploading...</div>
		<div class="foot-info">
			<h3 class="centered-wbtn centered-wbtn-bottom save">
  				<span>
  					<a class="btn btn-cancel-page" href="/MyAccount/AdvertiseList">previous</a>
					<input type="button" class="btn btn-submit-page" data-bind="click: SubmitForm" value="Submit" />
                </span>
			</h3>
		</div>
	</fieldset>
</form>
<script type="text/javascript">
    var data = @(Html.Raw(Json.Encode(Model)));
</script>
<script src="/Scripts/Banner/EditBanner.js" type="text/javascript"></script>
<script src="/Scripts/jquery.uploadify.js" type="text/javascript"></script>
<script src="/Scripts/apps.js" type="text/javascript"></script>